package com.gdssoft.pdaweb.dao.am;
/*
 *  捷达世软件（深圳）有限公司
 *  Copyright (C) 2008-2010 ShenZhen JieDaShi Software Limited Company.
*/
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.gdssoft.core.command.QueryFilter;
import com.gdssoft.core.dao.BaseDao;
import com.gdssoft.pdaweb.model.Excel;
import com.gdssoft.pdaweb.model.am.AmPlan;
import com.gdssoft.pdaweb.model.am.PdaAmMeterList;
import com.gdssoft.pdaweb.model.water.PdaWaterList;

/**
 * 
 * @author 
 *
 */
public interface PdaAmMeterListDao extends BaseDao<PdaAmMeterList>{

	/**
	 * 查询
	 * @param pdaAmMeterList
	 * @return
	 */
	public List<PdaAmMeterList> query(PdaAmMeterList pdaAmMeterList,int start,int to);
	
	/**
	 * 查询记录数
	 * @author F3229233 2013-1-15 下午3:33:14 
	 * @param pl
	 * @return
	 */
	public int queryCount(PdaAmMeterList pl);
	
	/**
	 * 导入excel表到DB
	 */
	public int importExcel(List<Excel> excelList);
/**
 * 检查amId是否存在
 * @param amId
 * @return
 */
	public boolean checkAmidExist(String amId,String depIdS);
	/**
	 * 检查记录是否存在
	 * @param amId
	 * @param importMonth
	 * @return
	 */
	public boolean recodExist(String amId, String importMonth);
	/**
	 * 获得对应的表的读数
	 * @param amId
	 * @param month
	 * @return
	 */
	public Long getDegreeByTime(String amId,String month);

	/**
	 * 更新记录id in ids 的记录状态为status,
	 * @author F3229233 2013-1-17 上午10:25:28 
	 * @param ids = '112,22,45'
	 * @param status
	 * @return
	 */
	public boolean check(String ids, String status);
	/**
	 * 
	 * @param meterID
	 * @param month
	 * @return
	 */
	public PdaAmMeterList getAmListByMeterIDAndMonth(String meterID, String month);

	public boolean saveFixedUsage(PdaAmMeterList pdaAmMeterList);

	/*
	 *待審核的計劃列表 
	 */
	public List<AmPlan> getPlanList(String month,String planName,String executor,String dptId,QueryFilter filter);
	/**
	 * 按照計劃審核
	 */
	public boolean checkPlan(String ids, String status,String month);
	
	/**
	 * 根据计划ID串和月份得到这些计划下该月份的表ID
	 * @param ids
	 * @param month
	 * @return
	 */
	public String getPdaAmMeterIdList(String ids,String month);
	/**
	 * 审核明细查询
	 */
	public List<PdaAmMeterList> getCheckDetailSearch(String planId,String planName ,String month,	
			            String executor,String fangId,	String waterId,	String dongId,String quId,String depId,QueryFilter filter);
	
	/**
	 * 电表记录审核查询状态编译
	 */
	public List<PdaAmMeterList>checkStatus(Long planId,String month);
	/*
	 *待審核的計劃列表 
	 *数量
	 */
	public int getPlanListNum(String month,String planName,String executor,String dptId);
	
	/**
	 * 审核明细查询
	 */
	public int getCheckDetailSearchNumb(String planId,String planName ,String month,	
			            String executor,String fangId,	String waterId,	String dongId,String quId,String depId);

	public List<PdaAmMeterList> getList(Map params,
			String depIds);

	public int getListCount(Map params, String depIds);

		
}
